package com.xinsoft.utils.validator;

import com.xinsoft.exception.MyException;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author Li9527
 * @Description 数据校验
 * @Date 2023/4/19 14:57
 **/
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new MyException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new MyException(message);
        }
    }
}
